package com.dubbo.springboot.sample.consumer.controller;


import com.alibaba.dubbo.config.annotation.Reference;
import com.dubbo.springboot.sample.api.service.DemoService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author huabo
 */
@RestController
public class DemoConsumerController {

    @Reference(version = "1.0.0",mock = "true")
    private DemoService demoService;


    @RequestMapping("/sayHello")
    public String sayHello(@RequestParam String name) throws InterruptedException {
        return demoService.sayHello(name);
    }


}

